package main

import (
	"fmt"
	"math/rand"
	"time"
)

func sort(arr *[20]int) {

	for i := len(arr) - 1; i >= 0; i-- {
		for j := 0; j < i; j++ {
			if arr[i] < arr[j] {
				arr[i], arr[j] = arr[j], arr[i]
			}
		}
	}
}
func main() {
	var arr [20]int

	rand.Seed(time.Now().UnixNano())
	for i := 0; i < len(arr); i++ {
		arr[i] = rand.Intn(100) + 1
	}
	fmt.Println(arr)

	sort(&arr)
	fmt.Println(arr)

}
